package com.udima.reglocation.entities;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

public class UserLoginResult {

    private UserSession userSession;
    private Set<UserLoginError> loginErrors;

    public UserLoginResult() {
	loginErrors = new HashSet<UserLoginError>();
    }

    public UserSession getUserSession() {
	return userSession;
    }

    public void setUserSession(UserSession userSession) {
	this.userSession = userSession;
    }

    public boolean isLoginSuccessful() {
	return loginErrors.isEmpty();
    }

    public Collection<UserLoginError> getLoginErrors() {
	return loginErrors;
    }

    public void addLoginError(UserLoginError loginError) {
	this.loginErrors.add(loginError);
    }

}
